<?php
require_once("../Connections/mlu.php");
 	$rem=$_SERVER['REMOTE_ADDR'];
	$query_Recordset1riclibri = "insert into ordini (data,posizione,operatore,orario) values (date(now()),'confermati','$rem',now())";
	    $Recordset1riclibri = mysql_query($query_Recordset1riclibri, $mlu) or die(mysql_error());
		$query_Recordset1riclibri = "select max(idordine) as mas from ordini where operatore='$rem'";
	    $Recordset1riclibri = mysql_query($query_Recordset1riclibri, $mlu) or die(mysql_error());
		$max=mysql_fetch_assoc($Recordset1riclibri);
		$max=$max['mas'];
?>

<script type="text/javascript">
$('#idmlu').keyup(function(e) {
    if(e.keyCode == 13 || e.keyCode==35) {
		var jrole = $('#idmlu').val();
        searchmlu(jrole);
		idmlu.value='';
    }
});

function searchmlu(value) {
		if (value.length>=2)
		{
			$('#tabven').fadeOut(1000,function(){$('#tabven').load("vendita/tabellavenduti.php?idmlu="+value,'',$('#tabven').fadeIn(1000));}); 
		}
}


$('#fine').click(function (){
	$('#index').fadeOut(1000,function(){$('#index').load("vendita/offerta.php?max=<?php echo $max; ?>",'',$('#index').fadeIn(1000));});
	return false;
});

</script>
Inserisci codice libro: <input type="text" name="idmlu" id='idmlu'/>
<div id="tabven"></div>

<button id="fine"><a href="#">Fine</a></button>

